<template>
  <SelectStore 
    :store="selectStore" 
    :jsonAttr="{id: 'id', label: 'label', value: 'name'}" 
    value-key="id"
    v-infinite-scroll="selectStore"
  />
  <br />
  <el-input placeholder="根据员工名称搜索" style="width: 200px" v-model="searchData.searchName" /><el-button type="primary" @click="handleFilterInfo">搜索</el-button>
  <TableStore :store="tableStore">
      <TableColumn prop="id" label="编号" width="180"/>
      <TableColumn prop="objectName" label="项目名称" width="180" />
      <TableColumn prop="objectDate" label="项目日期" />
      <TableColumn prop="startTime" label="开始日期" width="180" />
      <TableColumn prop="endTime" label="结束日期" width="180" />
      <TableColumn prop="leadersName" label="领导姓名" />
      <TableColumn prop="personName" label="项目人员" width="180" />
      <TableColumn prop="moneny" label="薪资" width="180" />
      <TableColumn prop="need" label="需求" />
      <TableActionColumn>
        <template #default="{row, index, column}">
          <TableEditorButton :row="row" :column="column" :index="index"></TableEditorButton>
          <el-button type="text">删除</el-button>
        </template>
      </TableActionColumn>
  </TableStore>
</template>
<script setup>
import { reactive } from 'vue'
import { SelectOneStore } from '@/store/SelectStore/SelectOne'
import { TableOneStore } from '@/store/TableStore/TableOneStore'
import SelectStore from '@/components/Select/SelectStore.vue'
import TableStore from '@/components/Table/TableStore.vue'
import TableColumn from '@/components/Table/TableColumn.vue'
import TableActionColumn from '@/components/Table/TableActionColumn.vue'
import TableEditorButton from '@/components/Table/TableEditorButton.vue'
import vInfiniteScroll from '@/directives/infiniteScroll'

const selectStore = new SelectOneStore()
const tableStore = new TableOneStore()

const searchData = reactive({
      searchName: ''
    })

const handleFilterInfo = ()=>{
  console.log(searchData, '13');
}
</script>
